﻿<Window x:Class="Microsoft.Research.ScientificWorkflow.UIDesigner.NamespaceDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowStartupLocation="CenterScreen"
    Width="340" Height="160" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AutomationProperties.AutomationId="NewNamespaceWindow">
    
    <Window.Resources>
        <Style x:Key="PopupCloseButton" BasedOn="{x:Null}" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Rectangle Fill="#FFCCCCCC" Stroke="{x:Null}" RadiusX="4.5" RadiusY="4.5" x:Name="rectangle"/>
                            <Rectangle Fill="#FF4F4F4F" Stroke="{x:Null}" RadiusX="0" RadiusY="0" Margin="8,3.5,7,3.5" RenderTransformOrigin="0.5,0.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="-34.039"/>
                                        <TranslateTransform X="0" Y="0"/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Fill="#FF4F4F4F" Stroke="{x:Null}" RadiusX="0" RadiusY="0" RenderTransformOrigin="0.5,0.5" Margin="8,3.5,7,3.5">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="34.039"/>
                                        <TranslateTransform X="0" Y="0"/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Fill" TargetName="rectangle" Value="#FFADADAD"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Fill" TargetName="rectangle" Value="#FF9B9B9B"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    
    <Grid>
        <Border BorderBrush="#FFBDBDBD" BorderThickness="1,1,2,2" CornerRadius="4,4,4,4" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF7F7F7" Offset="0"/>
                    <GradientStop Color="#FFF1F1F1" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="38"/>
                </Grid.RowDefinitions>
                <Border Name="brdrHeader" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Grid.Row="0" CornerRadius="4,4,0,0">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF7F7F7" Offset="0"/>
                            <GradientStop Color="#FFE9E9E9" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <Grid>
                        <TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Center" FontSize="14" Foreground="#FF5F5F5F" Text="Category" TextWrapping="Wrap"/>
						<Button Name="btnClose" HorizontalAlignment="Right" Margin="0,5.5,5,5.5" Style="{DynamicResource PopupCloseButton}" Width="17" AutomationProperties.AutomationId="CloseButton"/>
					</Grid>
                </Border>
                
                <Button Name="btnCancel" IsCancel="True" HorizontalAlignment="Right" Width="70" Content="Cancel" Margin="0,0,10,0" VerticalAlignment="Center" Grid.Row="2" TabIndex="3" AutomationProperties.AutomationId="AIDCancelNamespaceButton"/>
                <Button Name="btnSave" IsDefault="True" IsEnabled="False" HorizontalAlignment="Right" Width="70" Content="Save" Margin="0,0,85,0" VerticalAlignment="Center" Grid.Row="2" TabIndex="2" AutomationProperties.AutomationId="AIDSaveNamespaceButton"/>
                
                <Border Grid.Row="1" Background="#FFFFFFFF">
                    <StackPanel Margin="5,5,0,0">
                        <DockPanel LastChildFill="False">
                            <TextBlock Margin="29,0,0,0" Text="Name:"/>
                            <TextBox Name="txtName" AutomationProperties.AutomationId="AIDNamespaceName" Margin="5,0,0,0" Width="250" MaxLength="75"/>
                        </DockPanel>
                        
                        <DockPanel Margin="0,10,0,0" LastChildFill="False">
                            <TextBlock Text="Description:"/>
                            <TextBox Name="txtDescription" AutomationProperties.AutomationId="AIDNamespaceDescription" Margin="5,0,0,0" Width="250" Height="45" AcceptsReturn="True" MaxLength="75"/>
                        </DockPanel>
                    </StackPanel>
                </Border>
            </Grid>
        </Border>
    </Grid>
</Window>
